package com.youlai.boot.system.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;

/**
 * 生产追溯表单对象
 *
 * @author liwenbing
 * @since 2025-04-09 14:04
 */
@Getter
@Setter
@Schema(description = "生产追溯表单对象")
public class SysDianciProductionRetrospectForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    private Long id;

    @Schema(description = "生成批次")
    @NotBlank(message = "生成批次不能为空")
    @Size(max=64, message="生成批次长度不能超过64个字符")
    private String productionBatch;

    @Schema(description = "产品型号")
    @NotBlank(message = "产品型号不能为空")
    @Size(max=64, message="产品型号长度不能超过64个字符")
    private String spec;

    @Schema(description = "计划数量")
    @NotBlank(message = "计划数量不能为空")
    @Size(max=64, message="计划数量长度不能超过64个字符")
    private String num;

    @Schema(description = "实际产量")
    @Size(max=64, message="实际产量长度不能超过64个字符")
    private String realityNum;

    @Schema(description = "合格率")
    @Size(max=64, message="合格率长度不能超过64个字符")
    private String percentOfPass;

    @Schema(description = "生产状态")
    @NotNull(message = "生产状态不能为空")
    private Integer productionState;

    @Schema(description = "开始时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @Schema(description = "结束时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @Schema(description = "备注")
    @Size(max=255, message="备注长度不能超过255个字符")
    private String remark;


}
